package com.cmdi.opensite.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cmdi.opensite.entity.Role;
import com.cmdi.opensite.mapper.RoleMapper;
import com.cmdi.opensite.service.RoleService;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * 角色服务实现类
 */
@Service
public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements RoleService {
    
    @Override
    public List<Role> getAllRoles() {
        return list();
    }
    
    @Override
    public List<Role> getRolesByUserId(Long userId) {
        // 这里应该从用户角色关联表查询，暂时返回空列表
        return new ArrayList<>();
    }
}